import request from '@/utils/request'

const review = {
  // 根据项目id获取某个项目的所有立项论证信息
  projectExpertsInfo (projectId) {
    return request.get(`/kjxm/projectExpertsInfo/getByProjectId/${projectId}`);
  },
  // 某个项目添加专家评审信息
  projectExpertsInfoUpdate (data) {
    return request.post(`/kjxm/projectExpertsInfo/update`, data);
  },
  projectExpertsInfoDetail (id) {
    return request.get(`/kjxm/projectExpertsInfo/detail/${id}`);
  },
  getReviewResult (reviewType) {
    return request.get(`/kjxm/project/getReviewResult/${reviewType}`);
  },
  addReviewResult (data) {
    return request.post(`/kjxm/projectReviewResults/add`, data);
  },
  projectExpertsInfoByReviewType (params) {
    return request.get(`/kjxm/projectExpertsInfo/getByReviewType`, {
      params
    })
  },
  projectExpertsInfoByReviewTypeForReview (params) {
    return request.get(`/kjxm/projectExpertsInfo/getByReviewTypeForReview`, {
      params
    })
  },
  projectReviewTeamGetByBusinessIdAndReviewType (params) {
    return request.get(`/kjxm/projectReviewTeam/getByBusinessIdAndReviewType`, {
      params
    })
  },
  indexList (params) {
    return request.get('/kjxm/reviewIndex/list', { params });
  },
  indexGet (id) {
    return request.get(`/kjxm/reviewIndex/detail/${id}`);
  },
  indexUpdate (data) {
    return request.post(`/kjxm/reviewIndex/update`, data);
  },
  indexAdd (data) {
    return request.post(`/kjxm/reviewIndex/add`, data);
  },
  indexDel (id) {
    return request.post(`/kjxm/reviewIndex/delete/${id}`);
  },

  // 新增评审组
  teamAdd (data) {
    return request.post(`/kjxm/reviewTeam/add`, data);
  },
  // 修改评审组
  teamUpdate (data) {
    return request.post(`/kjxm/reviewTeam/update`, data);
  },
  // 删除评审组
  teamDel (id) {
    return request.post(`/kjxm/reviewTeam/delete/${id}`);
  },
  // 获取评审组
  teamGet (id) {
    return request.get(`/kjxm/reviewTeam/detail/${id}`);
  },
  // 获取参与次数
  getByExpertsId (id) {
    return request.get(`/kjxm/expertsJoinHistory/getByExpertsId/${id}`);
  },
  // 评审组树状列表
  teamTree (params) {
    return request.get('/kjxm/reviewTeam/tree', { params });
  },
  teamList (params) {
    return request.get('/kjxm/reviewTeam/list', { params });
  },
  // 评审组绑定项目
  teamInnovationAdd (data) {
    return request.post('/kjxm/innovationReviewTeam/add', data)
  },
  // 评审组绑定多个项目
  teamProjectAddList (data) {
    return request.post('/kjxm/projectReviewTeam/addList', data)
  },
  // 删除项目与评审组绑定关系
  teamProjectDel (id) {
    return request.post(`/kjxm/projectReviewTeam/delete/${id}`);
  },
  // 根据评审组id获取该分组下所有项目
  teamProjectGet (id) {
    return request.get(`/kjxm/projectReviewTeam/getByTeamId/${id}`);
  },
  // 查询项目列表
  teamInnovationList (params) {
    return request.get('/kjxm/innovations/waitReviewList', { params })
  },
  //
  teamProjectListByReviewType (params) {
    return request.get(`/kjxm/project/getByReviewType`, { params })
  },
  teamSmartProjectListByReviewType (params) {
    return request.get(`/kjxm/project/getByReviewTypeSmart`, { params })
  },
  // 查询专家列表
  teamExpertList (params) {
    return request.get('/kjxm/expertsReviewTeam/expertsList', { params })
  },
  teamSmartExpertList (params) {
    return request.get('/kjxm/expertsReviewTeam/smartExpertsList', { params })
  },
  // 新增单个专家与评审组绑定
  teamExpertAdd (data) {
    return request.post('/kjxm/expertsReviewTeam/add', data)
  },
  // 新增多个专家与评审组绑定
  teamExpertAddList (data) {
    return request.post('/kjxm/expertsReviewTeam/addList', data)
  },
  // 删除专家与评审组绑定关系
  teamExpertDel (id) {
    return request.post(`/kjxm/expertsReviewTeam/delete/${id}`)
  },
  // 根据评审组id获取该分组下所有专家
  teamExpertGet (id) {
    return request.get(`/kjxm/expertsReviewTeam/getByTeamId/${id}`);
  },
  // 添加专家评审信息
  teamExpertsInfoUpdate (data) {
    return request.post(`/kjxm/projectExpertsInfo/update`, data);
  },
  // 组专家评审详情
  teamExpertsInfoGet (id) {
    return request.get(`/kjxm/projectExpertsInfo/detail/${id}`);
  },
  // 初始化项目与专家评审信息
  teamInfoInit (id) {
    return request.post(`/kjxm/projectExpertsInfo/init/${id}`);
  },
  // 根据项目id获取某个项目的所有专家评审信息
  teamInfoGetByProjectId (id) {
    return request.get(`/kjxm/projectExpertsInfo/getByProjectId/${id}`);
  },
  //
  teamProjectReviewUpdate (data) {
    return request.post(`/kjxm/projectReviewTeam/update`, data);
  },
  projectReviewTeamGet (id) {
    return request.get(`/kjxm/projectReviewTeam/detail/${id}`);
  },
  reviewUserProjectAdd (data) {
    return request.post(`/kjxm/reviewUserProject/add`, data);
  },
  reviewUserProjectGetByUserId (id) {
    return request.get(`/kjxm/reviewUserProject/getByUserId/${id}`);
  },
  zjSignPdf (data) {
    return request.post(`/kjxm/projectExpertsInfo/zjSignPdf`, data);
  },
  sendMsgByTeamId (id) {
    return request.get(`/kjxm/expertsReviewTeam/sendMsgByTeamId/${id}`);
  },
  sendMsgById (id) {
    return request.get(`/kjxm/expertsReviewTeam/sendMsgById/${id}`);
  },
  // 设置评审组专家组长
  setTeamLeader (data) {
    return request.post(`/kjxm/expertsReviewTeam/setTeamLeader`, data);
  },
  // 专家评审组意见列表
  teamLeaderMyReviewList (params) {
    return request.get(`/kjxm/expertsReviewTeam/myReviewList`, { params });
  },
  // 专家评审组意见列表
  teamLeaderAllReviewList (params) {
    return request.get(`/kjxm/expertsReviewTeam/allReviewList`, { params });
  },
  // 评审意见模版
  reviewTemplate (type) {
    return request.get(`/kjxm/reviewTemplate/getUsedInfoByType/${type}`);
  },
  // 评审组长意见提交
  teamLeaderOpinion (data) {
    return request.post(`/kjxm/projectReviewTeam/collectOpinion`, data);
  },
  // 生成专家评审意见表pdf
  projectExpertsInfoPdf (data) {
    return request.post(`/kjxm/projectReviewTeam/createPdfByWindows`, data);
  },
  // 生成
  sendMsgByIdAndTemplateId (id, templateId) {
    return request.get(`/kjxm/expertsReviewTeam/sendMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  // 生成
  createMsgByIdAndTemplateId (id, templateId) {
    return request.get(`/kjxm/expertsReviewTeam/createMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  sendMsgByTeamIdAndTemplateId (id, templateId) {
    return request.get(`/kjxm/expertsReviewTeam/sendMsgByTeamIdAndTemplateId/${id}/${templateId}`);
  },
  // 根据项目ID组ID获取项目评审记录
  getByTeamIdAndBusinessId (id, teamId) {
    return request.get(`/kjxm/projectReviewTeam/getByTeamIdAndBusinessId/${id}/${teamId}`);
  },
  getExpertByIds (ids) {
    return request.post(`/kjxm/expertsReviewTeam/getExpertByIds`, ids);
  },
  teamExpertAddListConfirm (data) {
    return request.post('/kjxm/expertsReviewTeam/addListNotVerify', data)
  },
  projectList (params) {
    return request.get('/kjxm/projectReviewTeam/list', { params })
  },
  // 待评审项目列表
  reviewListByReviewType (params) {
    return request.get('/kjxm/project/reviewListByReviewType', { params })
  },
  getZZYJ () {
    return request.get('/kjxm/expertsReviewTeam/getZZYJ')
  },
}
export default review;
